package com.luban.service;

import com.luban.mapper.OrderMapper;
import com.luban.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserService {


    /**
     * spring整合mybatis ：将mybatis产生的接口的代理对象(bean)纳入spring的管理
     */
    @Autowired
    private UserMapper userMapper; //userMapper的代理对象(由mybatis产生)

     @Autowired
    private OrderMapper orderMapper; //OrderMapper的代理对象(由mybatis产生)


    public void test() {
        System.out.println(userMapper.selectById());
        System.out.println(orderMapper.selectById());
    }
}
